package datatypes;

import java.util.NoSuchElementException;

public enum MCAnimation {
	NONE		(0),
	SWINGARM	(1),
	DAMAGE		(2),
	LEAVE_BED	(3),
	EAT_FOOD	(5),
	CROUCH		(104),
	UNCROUCH	(105),
	
	UNKNOWN		(102);
	
	
	private int value;
	MCAnimation(int value) {
		this.value = value;
	}
	
	public static MCAnimation getAnimation(int value) {
		for(MCAnimation animation : values()) {
			if(animation.value == value) {
				return animation;
			}
		}
		throw new NoSuchElementException();
	}
}
